package com.ljx.NoteBody.mapper;

import com.ljx.NoteBody.dto.NoteDto;
import com.ljx.NoteBody.entity.Note;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface NoteMapper {

    int saveNote(NoteDto noteDto);

    List<Note> selectNewNotes(int page, int pageSize, String username);

    Note selectNoteById(Long id);

    int totalPage(String username);

    int addNoteViewsCount(Long id);

    List<Note> selectNoteByUsername(String username);

    int updateNote(NoteDto noteDto);

    List<Note> queryHotNotes();

    int deleteNote(Long noteId);
}


